#include "Netdefs.h"

#include <iostream>
using std::cout;
using std::endl;

#include <string>
using std::string;

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

#include "tracker.h"

void main (int argc, char* argv[]) {
	string ip = argc > 1 ? argv[1] : "127.0.0.1";
	SocketClient *mysock;
	try {
		mysock = new SocketClient(ip, SERVERPORT); // this will have to be changed to command line args
	}
	catch (...) {
		cout << "Couldn't connect to " << ip << endl;
		exit(1);
	}

	cout << "Connected.." << endl;

	#ifdef CAM
	CvCapture* CaptureTop = cvCaptureFromCAM(0);
	#else
	CvCapture* CaptureTop = cvCaptureFromAVI("data\\test4.avi");
	#endif
	initParkinglot(CaptureTop,mysock);
	delete mysock;
}